package net.hn.hnms.biz.quality.domain;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
import java.math.BigDecimal;

/**
 * Author: ly
 * 煤质计划表
 */
@Data
@NoArgsConstructor
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper = false)
@Table(name = "coal_quality_plan")
public class CoalQualityPlan extends BaseModel implements Serializable {
    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_UUID)
    private String coalQualityPlanId;
    @ApiModelProperty(value = "计划编号")
    @Length(max = 100, message = "计划编号长度不能超过100个字符")
    @NotBlank(message = "计划编号不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String planCode;
    @ApiModelProperty(value = "计划名称")
    @Length(max = 100, message = "计划名称长度不能超过100个字符")
    @NotBlank(message = "计划名称不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String planName;
    @ApiModelProperty(value = "计划类型")
    @Length(max = 0, message = "计划类型长度不能超过0个字符")
    @NotBlank(message = "计划类型不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String planType;
    @ApiModelProperty(value = "计划开始时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @NotNull(message = "计划开始时间不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private Date startDate;
    @ApiModelProperty(value = "计划结束时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @NotNull(message = "计划结束时间不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private Date endDate;
    @ApiModelProperty(value = "灰份（%）")
    @Digits(integer = 0, fraction = 2, message = "灰份（%）格式不正确")
    @DecimalMin(value = "0.00", message = "灰份（%）格式不正确")
    @NotNull(message = "灰份（%）不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal ash;
    @ApiModelProperty(value = "全水份（%）")
    @Digits(integer = 0, fraction = 2, message = "全水份（%）格式不正确")
    @DecimalMin(value = "0.00", message = "全水份（%）格式不正确")
    @NotNull(message = "全水份（%）不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal moistureTotal;
    @ApiModelProperty(value = "含矸率（%）")
    @Digits(integer = 0, fraction = 2, message = "含矸率（%）格式不正确")
    @DecimalMin(value = "0.00", message = "含矸率（%）格式不正确")
    @NotNull(message = "含矸率（%）不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal shaleContent;
    @ApiModelProperty(value = "低位发热量(MJ/KG)")
    @Digits(integer = 0, fraction = 2, message = "低位发热量(MJ/KG)格式不正确")
    @DecimalMin(value = "0.00", message = "低位发热量(MJ/KG)格式不正确")
    @NotNull(message = "低位发热量(MJ/KG)不能为空")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal netCalorificValue;
    @ApiModelProperty(value = "禁用:1  启用:0")
    @Length(max = 0, message = "禁用:1  启用:0长度不能超过0个字符")
    @NotBlank(message = "禁用:1  启用:0不能为空")
    private String status;
}









